<%@page language="java" pageEncoding="UTF-8" %>
<%@include file="/template/common/include/top.jsp" %>
<%@include file="/template/common/include/constant.jsp" %>
<script type="text/javascript" src="${pageContext.request.contextPath}/template/js/gftuserfunc.js"></script>
<body>
<div style="width:1000px;">
    <div class="main1">当前的位置:约车管理</div>
        <input type="hidden" name="op" value="findUser"/>

        <div class="main_search">
            
            ${xyxx}
        </div>

    <div class="main_list">
        <div class="main_list_left">预约规则表</div>
        <div class="main_edit">
            <c:if test='${u.run == 2}'>
                <input type="button" onClick="commit('listFrm',[['id_op','start']]);" value="启动监视" class="edit_ad"/>
            </c:if>

            <c:if test='${u.run == 1}'>
            <input type="button" onClick="commit('listFrm',[['id_op','stop']]);" value="停止监视" class="edit_ad"/>
            </c:if>
            &nbsp;


            <input type="button" onClick="commit('listFrm',[['id_op','add']]);" value="添加" class="edit_ad"/>
            &nbsp;
            <input type="button" onClick="if(confirm('是否要删除选中用户?')){commit('listFrm',[['id_op','del']])};" value="删除"
                   class="edit_ad"/>
        </div>
    </div>
    <form method="post" action="${path}/dfss/plan.x" id="listFrm" d_op="find">
        <input type="hidden" id="id_op" name="op" value="find"/>
        <input type="hidden" id="id_u_id" name="p.id"/>
        ${sys_searchparemeter}
        <div class="list_div">
            <table>
                <tr>
                    <th width="10"><input type="checkbox" onClick="checkByName('ids',this.checked);"/></th>
                    <th><a href="javascript:sort('planDate','listFrm');" id="sort_userName">日期</a></th>
                    <th><a href="javascript:sort('planTime','listFrm');" id="sort_userType">时间</a></th>
                    <th width="80">操作</th>
                </tr>
                <c:forEach items="${pageBean.retList}" var="row">
                    <tr>
                        <td>
                            <input type="checkbox" name="ids" value="${row.id}"/>
                        </td>
                        <td>
                            <c:choose>
                                <c:when test='${row.planDate == "2"}'>
                                    星期一
                                </c:when>
                                <c:when test='${row.planDate == "3"}'>
                                    星期二
                                </c:when>
                                <c:when test='${row.planDate == "4"}'>
                                    星期三
                                </c:when>
                                <c:when test='${row.planDate == "5"}'>
                                    星期四
                                </c:when>
                                <c:when test='${row.planDate == "6"}'>
                                    星期五
                                </c:when>
                                <c:when test='${row.planDate == "7"}'>
                                    星期六
                                </c:when>
                                <c:when test='${row.planDate == "1"}'>
                                    星期日
                                </c:when>
                                <c:otherwise>
                                    ${row.planDate}
                                </c:otherwise>
                            </c:choose>

                        </td>
                        <td>

                            <c:choose>
                                <c:when test='${row.planTime == "1"}'>
                                    7点-9点
                                </c:when>
                                <c:when test='${row.planTime == "2"}'>
                                    9点-13点
                                </c:when>
                                <c:when test='${row.planTime == "3"}'>
                                    13点-17点
                                </c:when>
                                <c:when test='${row.planTime == "4"}'>
                                    17点-19点
                                </c:when>
                                <c:when test='${row.planTime == "5"}'>
                                    17点-19点
                                </c:when>
                                <c:otherwise>
                                    ${row.planTime}
                                </c:otherwise>
                            </c:choose>

                        </td>
                        <td>
                            <a href="javascript:commit('listFrm',[['id_op','del']],check('ids','${row.id}'));"
                               onClick="return confirm('是否要删除此条记录?')"><img
                                    src="${pageContext.request.contextPath}/template/images/cz_1.gif" alt="删除"
                                    border="0"></a>
                        </td>
                    </tr>
                </c:forEach>
            </table>
        </div>
        <div class="main_page">
            <%@include file="/template/common/include/pagefooter.jsp" %>
        </div>
    </form>
</div>
</body>